package com.gsafety.library.Widgets;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.text.TextUtils;
import android.widget.TextView;

import com.gsafety.library.R;


public class ProgressDia extends Dialog {
    private TextView mTvTitle;

    public ProgressDia(Context context) {
        super(context, R.style.alert_dialog);
        setCancelable(false);
        setCanceledOnTouchOutside(false);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dia_progress);
        mTvTitle = findViewById(R.id.progress_dia_title);
    }

    public ProgressDia setTitleText(String text) {
        if (mTvTitle != null && !TextUtils.isEmpty(text)) {
            mTvTitle.setText(Html.fromHtml(text));
        }
        return this;
    }
}
